/*
 * description: 回收接口
 * author: Muze
*/

import request from '../utils/request'

// 回收商品分类
export function getGoodsCategory(params) {
    return request.get('recovery_goods/getGoodsCategory', {params})
}

// 搜索回收商品型号
export function getSearchGoods(params) {
	return request.get('recovery_goods/getSearchGoods', {params});
}

// 评估参数
export function getGoodsParams(params) {
    return request.get('recovery_goods/getGoodsItem', {params});
}

// 评估价值
export function getAssess(params) {
    return request.get('recovery_goods/getAssess', {params});
}

// 订单提交
export function postSubmitOrder(params) {
    return request.post('recovery_order/buy', params);
}

// 订单详情
export function getOrderDetail(params) {
    return request.get('recovery_order/getOrderDetail', {params})
}

// 取消订单
export function postOrderClose(params) {
    return request.post('recovery_order/cancel', params);
}

// 用户寄件
export function postGoodsMail(params) {
    return request.post('recovery_order/mail', params);
}

// 评估信息
export function getAssessDetail(params) {
    return request.get('recovery_order/assessDetail', {params});
}

// 订单列表
export function getOrderList(params) {
    return request.get('recovery_order/getOrderList', {params});
}

// 确认交易
export function postConfirmDeal(params) {
    return request.post('recovery_order/userConfirm', params);
}

// 获取回收订单数
export function getOrderNum() {
    return request.get('recovery_order/getOrderNum');
}

// 获取回收协议
export function getRecycleProtocol() {
    return request.get('policy/recovery');
}